package com.leyou.item.api;

import com.leyou.item.pojo.Category;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author CHERRY
 * @date 2018-09-07-22:14
 */
@RequestMapping("category")
public interface CategoryApi {
    /**
     * 根据商品分类id查询商品分类名称
     *
     * @param ids
     * @return
     */
    @GetMapping("names")
    List<String> queryCategoryNamesByIds(@RequestParam("ids") List<Long> ids);

    /**
     * 查询父分类
     *
     * @param cid
     * @return
     */
    @GetMapping("all")
    List<Category> queryAllCategoryByCid3(@RequestParam("cid") Long cid);
}
